package com.lanou.web.controller;

import com.github.pagehelper.PageHelper;
import com.lanou.entity.PageInfo;
import com.lanou.entity.Topic;
import com.lanou.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author 姚云鹏
 * Create at: 2018/6/21 16:44
 */
@Controller
@RequestMapping("/topic")
public class TopicController {
    @Autowired
    private TopicService topicService;

    @ResponseBody
    @RequestMapping("/list")
    public Object list(PageInfo pageInfo,String sort,String order) {
        return topicService.list(pageInfo,sort,order);
    }
}
